<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('编辑延期任务')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-task1-delay-edit" >
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-2 control-label">任务标题：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" th:value="${delay.task_title}" th:field="*{delay.task_title}" readonly>
                    <input id="delayId" name="delay_Id" th:value="${delay.delay_Id}" type="hidden"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">申请人员：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" th:value="${delay.user_name}" th:field="*{delay.user_name}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">延期时间：</label>
                <div class="col-sm-9">
                    <input type="text" class="input-sm form-control" id="datetimepicker-startTime" name="delay_time" th:field="*{delay.delay_time}" placeholder="延期时间" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">申请原因：</label>
                <div class="col-sm-9">
                    <textarea type="text" style="height: 200px" name="delay_reason" id="delayReason" multiple th:field="*{delay.delay_reason}" class="form-control" placeholder="请输入申请原因" required maxlength="255" ></textarea>
                </div>
            </div>
        </div>
    </form>
</div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
    var prefix = ctx + "management/delay";

    $("#datetimepicker-startTime").datetimepicker();

    $("#form-task1-delay-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-task1-delay-edit').serialize());
        }
    }

</script>
</body>
</html>
